//枚举类：当一个类它的对象是固定（确定），那么这个类简称为枚举类eg：Sex，Season

//定义枚举类
//1.5之前自定义枚举类
//1.5通过关键字enum定义枚举类

package com.fy.core.enums;

import lombok.AllArgsConstructor;

@AllArgsConstructor

public enum ApiErrorEnum {

    //参数不能为空
    PARAM_SHOULD_NOT_NULL(0000,"参数不能为空"),

    //登陆的错误信息
    LOGIN_USERNAME_PASSWORD_INVALID(1000,"用户名或者密码不正确"),
    LOGIN_INVALID_MSG(1001,"验证码不正确"),
    LOGIN_TOKEN_IS_EMPTY(1002,"令牌不能为空"),
    LOGIN_TOKEN_IS_INVALID(1003,"无效令牌"),


    //题目的错误信息
    QU_CONTENT_IS_NULL(2000,"题目内容为空"),
    QU_REPO_ATLEAST_ONE(2001,"未绑定题库"),
    QU_HAS_ANSWER(2002,"客观题至少要包含一个备选答案"),
    QU_JUDGE_HAS_RIGHT_ANSWER(2003,"必须定义选项是否正确项"),
    QU_ANSWER_CONTEXT_IS_NULL(2004,"选项内容不能为空！"),
    QU_ANSWER_HAS_ONE(2005,"至少要包含一个正确项"),
    QU_RADIO_ANSWER_HAS_ONE(2006,"单选题不能包含多个正确项"),

    //考试的错误信息
    EXAM_CONTENT_IS_NULL(3000,"考试题目内容为空"),
    EXAM_QUALIFY_SCORE(3001,"及格分未设置"),
    EXAM_TOTAL_TIME(3002,"考试时长未设置"),
    EXAM_REPO_IS_NULL(3003,"未设置题库"),
    EXAM_NOT_EXIT(3004,"考试不存在！"),
    EXAM_ANSWER_HAS_ONE(3005,"至少要包含一个正确项"),
    EXAM_RADIO_ANSWER_HAS_ONE(3006,"单选题不能包含多个正确项"),
    EXAM_NOT_TIME(3007, "不在考试时间"),
    EXAM_ClOSED(3008, "考试已经结束"),


    PAPER_NOT_EXIT(5000,"试卷不存在"),
    PAPER_IS_CLOSE(5001,"试卷已关闭"),
    PAPER_FAIL(5001,"组卷失败,请稍后重试，如果多次失败，请联系管理员");





    private final Integer code;

    private final String msg;


    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}

